/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package commonlib.domain;

/**
 *
 * @author jorge.daniel.negrete
 */

public class Node<tipo> {
  private char letter;
  private Node<tipo> left;
  private Node<tipo> right;
  private Node<tipo> middle;
  private boolean marked;
  private tipo data;
  private int level;

  public Node(char character,boolean marked,tipo a,int nivel)
  {
	  this.letter=character;
	  this.marked=marked;
	  data=a;
	  this.level=nivel;
  }
  public Node(tipo a)
  {
	  this.marked=false;
	  data=a;
	  this.level=0;
  }
  public char getLetter()
  {
	  return letter;
  }
  public Node<tipo> getLeft()
  {
	  return left;
  }
  public Node<tipo> getRight()
  {
	  return right;
  }
  public Node<tipo> getMiddle()
  {
	  return middle;
  }
  public void setRight(Node<tipo> rig )
  {
	this.right=rig;
  }
  public void setLeft(Node<tipo> esq )
  {
	this.left=esq;
  }
  public void setMiddle(Node<tipo> mig )
  {
	this.middle=mig;
  }
  public boolean getMarked()
  {
	  return this.marked;
  }
  public void setMarked(boolean m)
  {
	this.marked=m;
  }
  public tipo getData()
  {
	 return this.data;
  }
  public void setData(tipo dades)
  {
	 this.data=dades;
  }
  public void setLevel(int n)
  {
	 this.level=n;
  }
  public int getLevel()
  {
    	  return this.level;
  }
  public void setLetter(char a)
  {
    this.letter=a;
  }
}